package com.example.administrator.activity.Homework.Homework6.Homework6_1;

import android.content.Context;
import android.content.SharedPreferences;

import java.util.HashMap;

public class SpSaveHomework6 {
    public static boolean save(Context context, String ht, String wt) {
        SharedPreferences sp=context.getSharedPreferences("homework6",Context.MODE_PRIVATE);
        SharedPreferences.Editor editor=sp.edit();
        editor.putString("ht",ht);
        editor.putString("wt",wt);
        editor.commit();
        return true;
    }
    public static HashMap<String, String> get(Context context) {
        HashMap<String,String> hashMap=new HashMap<String, String>();
        SharedPreferences sp=context.getSharedPreferences("homework6",Context.MODE_PRIVATE);
        String ht=sp.getString("ht",null);
        String wt=sp.getString("wt",null);
        hashMap.put("ht",ht);
        hashMap.put("wt",wt);
        return hashMap;
    }


}
